﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!--_meta 作为公共模版分离出去-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 基本表单</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="${pageContext.request.contextPath }/shoppingadmin/favicon.ico">
	<link href="${pageContext.request.contextPath }/shoppingadmin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/shoppingadmin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/shoppingadmin/css/custom.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/shoppingadmin/css/animate.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/shoppingadmin/css/style.css?v=4.1.0" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="${pageContext.request.contextPath }/shoppingadmin/css/sweetalert.css" rel="stylesheet">
    <style type="text/css">
    	.note-editable{
    		height: 200px;
    	}
    </style>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>管理员添加</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal"  action="${pageContext.request.contextPath }/login/addadmin.html" method="post" id="form">
                        	<div class="form-group">
                        		<input type="hidden" name="admin.id" id="guanliyuanid" value="">
                        		<label class="col-sm-3 control-label"></label>
                        		<div class="col-sm-8" style="color: red;font-size: 15px">
                                    
                                </div>
                        	</div>
                        	<div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red;">*</span>管理权限：</label>
                                <div class="col-sm-8">
                                    <select id="rid" name="admin.qx" style="width: 100%;padding-top: 2px;"  class="form-control rolelist" >
										
									</select>
                                    <span class="help-block m-b-none"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red;">*</span>管理员账号：</label>
                                <div class="col-sm-8">
                                    <input id="username"  name="admin.user" value="" placeholder=" 请输入管理员账号" type="text"  class="form-control">
                                    <span class="help-block m-b-none"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red;">*</span>登录密码：</label>
                                <div class="col-sm-8">
                                    <input id="password" name="admin.password" id="password" placeholder=" 请输入要使用的登录密码" type="password"  class="form-control">
                                    
                                    	<span class="help-block m-b-none"></span>
                                    
                                    
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span style="color:red;">*</span>确认密码：</label>
                                <div class="col-sm-8">
                                    <input  id="confirm_password" placeholder=" 请再次输入登录密码" class="form-control" type="password">
                                    
                                    	<span class="help-block m-b-none"></span>
                                    
                                    
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-8">
                                    <button id="submit" class="btn btn-sm btn-info" type="submit">确认保存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 全局js -->
    <script src="${pageContext.request.contextPath }/shoppingadmin/js/jquery.min.js?v=2.1.4"></script>
    <script src="${pageContext.request.contextPath }/shoppingadmin/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- 自定义js -->
    <script src="${pageContext.request.contextPath }/shoppingadmin/js/content.js?v=1.0.0"></script>
    <!-- Sweet alert -->
    <script src="${pageContext.request.contextPath }/shoppingadmin/js/sweetalert.min.js"></script>
    <script type="text/javascript">

    	$(document).ready(function(){
    	
    		$("#submit").click(function(){
    			 var guanliyuanid = $("#guanliyuanid").val();
	       		 var username = $("#username").val();
	       		 var password = $("#password").val();
	       		 var confirm_password=$("#confirm_password").val();
	   			 var xingming = $("#xingming").val();
	   			 if(!username){
	   				 alert("请输入账号");
	   				 return false;
	   			 }
				 if(password){
					 if(password!=confirm_password){
						 alert("您输入的两次密码不一致，请重新输入！");
						 return false;
					 }
				 }else{
					 if(!guanliyuanid){
					 	alert("请输入密码");
					 	return false;
					 }
				 }
	   			 return true;
    		});
    	});
   
    </script>
  
    <!-- iCheck -->
    <script src="${pageContext.request.contextPath }/shoppingadmin/js/icheck.min.js"></script>
    <!-- jQuery Validation plugin javascript-->
    <script src="${pageContext.request.contextPath }/shoppingadmin/js/jquery.validate.min.js"></script>
    <script src="${pageContext.request.contextPath }/shoppingadmin/js/messages_zh.min.js"></script>

    <script src="${pageContext.request.contextPath }/shoppingadmin/js/form-validate-demo.js"></script>
    <script>
    </script>
    <script>
      	
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
    </script>
</body>
</html>
